package com.hjj.web.util;

import lombok.Data;

@Data
public class BusinessException extends RuntimeException{

    private Integer code;
    private String message;

    public BusinessException(String message){
        super(message);
//        this.code = ResultCodeEnum.BUSINESS_EXCEPTION.getCode();
        this.message = message;
    }

    public BusinessException(String message, Throwable cause){
        super(message,cause);
//        this.code = ResultCodeEnum.BUSINESS_EXCEPTION.getCode();
        this.message = message;
    }

    public BusinessException(Integer code, String message){
        super(message);
        this.code = code;
        this.message = message;
    }

    public BusinessException(Integer code, String message, Throwable cause){
        super(message,cause);
        this.code = code;
        this.message = message;
    }
}